package com.my.ph.entity.publish;

import cn.hutool.core.io.FileUtil;
import com.my.ph.entity.media.MediaInfo;
import lombok.Builder;
import lombok.Getter;
import lombok.experimental.Accessors;

import java.io.File;

@Getter
@Accessors(chain = true)
@Builder
public class PublishFileInfo {

    private String inform;
    private String fileName;
    private String fileParentPath;
    private String filePath;
    private String inputFilePath;
    private Integer season;

    private MediaInfo mediaInfo;

    public static class PublishFileInfoBuilder {

        public PublishFileInfoBuilder filePath(String filePath) {
            this.fileParentPath = FileUtil.getParent(filePath, 1);
            this.filePath = filePath;
            return this;
        }

    }

}
